<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin:0;
            padding:0;
        }
        div{
            height:100px;
            width:100px;
            /* margin-left:100px;
            margin-right:100px; */
            /* 如果不设置左边，只设置右边，左边默认0，以左边为准 */
            /* margin-left:auto; */

            /* margin:0 auto; */
            /* margin-left:100px; */
            background-color: aquamarine;

            /* 上下都设置为auto,默认为0, 除非脱离文档流定位*/
            margin:auto;
        }
    </style>
</head>
<body>
    <div></div>
</body>
</html>